<?php
if(count($friends) < 1) echo "Invite friends<br>";
else {?>
	<div style="height:20px;background:#bb3771;color:#ffffff;">Your Friends</div>
	<div style="border:2px solid #bb3771;"><ul class='flist'><?php
$default_img = My_URL::app_url("profile_pics/dummy.png",false);
foreach($friends as $friend) {
	$pic_url = $friend['pic_url'];
	if(empty($pic_url)) $pic_url = $default_img;
	echo "<li class='fbox'><a href=".My_URL::app_url('user/viewprofile/'.$friend['uid']).">
	<img src='$pic_url' class='fpic'></img><div class='fname'>{$friend['name']}</div></a></li>";
}?>
<div style="clear:both;"></div>
</ul></div>
<?php } ?>